import { Router } from 'hyper-express';
import requireUser from '../../../middlewares/auth/requireUser';
import cache from '../../../middlewares/cache';
import rowLevelPermission from '../../../middlewares/auth/rowLevelPermission';
//#region AutoCreateCode
import { uctooMinishopStoreController } from '../../../controllers';
const uctoominishopStoreRouter = new Router();
const minishopStoreController = new uctooMinishopStoreController();

uctoominishopStoreRouter.post('/add', requireUser, minishopStoreController.add);
uctoominishopStoreRouter.post('/edit', requireUser, rowLevelPermission('uctoo/minishop_store'), minishopStoreController.edit);
uctoominishopStoreRouter.post('/del', requireUser, rowLevelPermission('uctoo/minishop_store'), minishopStoreController.delete);

//For getting minishopStore with permission control
uctoominishopStoreRouter.get('/:id', requireUser,  rowLevelPermission('uctoo/minishop_store'), minishopStoreController.getSingle);
uctoominishopStoreRouter.get('/:limit/:page', requireUser,  rowLevelPermission('uctoo/minishop_store'), minishopStoreController.getMany);
uctoominishopStoreRouter.get('/:limit/:page/:skip', requireUser,  rowLevelPermission('uctoo/minishop_store'), minishopStoreController.getMany);

//#endregion AutoCreateCode
export default uctoominishopStoreRouter;
